# -*- coding: utf-8 -*-

class OrderTypeController < ApplicationController
  def getAllTypes
    subType = params[:sub_type]
    logger.info "---------------getAllTypes--------------"
    logger.info subType
    orderTypes = OrderType.find(:all,:conditions=>["sub_type = ?" ,subType])
    jsonStr = "{totalProperty:" + orderTypes.length.to_s + ",root:" + orderTypes.to_json() + "}"
    render :text=>jsonStr, :layout=>false
  end
end
